/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package vehiculeEMF.impl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EPackageImpl;

import vehiculeEMF.Craft;
import vehiculeEMF.LandVehicule;
import vehiculeEMF.Vehicule;
import vehiculeEMF.VehiculeEMFFactory;
import vehiculeEMF.VehiculeEMFPackage;

import vehiculeEMF.craft.CraftPackage;

import vehiculeEMF.craft.impl.CraftPackageImpl;

import vehiculeEMF.landvehicule.LandvehiculePackage;

import vehiculeEMF.landvehicule.impl.LandvehiculePackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class VehiculeEMFPackageImpl extends EPackageImpl implements VehiculeEMFPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass vehiculeEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass landVehiculeEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass craftEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum poweR_SOURCEEEnum = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum movemenT_TYPEEEnum = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see vehiculeEMF.VehiculeEMFPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private VehiculeEMFPackageImpl() {
		super(eNS_URI, VehiculeEMFFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link VehiculeEMFPackage#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static VehiculeEMFPackage init() {
		if (isInited) return (VehiculeEMFPackage)EPackage.Registry.INSTANCE.getEPackage(VehiculeEMFPackage.eNS_URI);

		// Obtain or create and register package
		VehiculeEMFPackageImpl theVehiculeEMFPackage = (VehiculeEMFPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VehiculeEMFPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VehiculeEMFPackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		LandvehiculePackageImpl theLandvehiculePackage = (LandvehiculePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LandvehiculePackage.eNS_URI) instanceof LandvehiculePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LandvehiculePackage.eNS_URI) : LandvehiculePackage.eINSTANCE);
		CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);

		// Create package meta-data objects
		theVehiculeEMFPackage.createPackageContents();
		theLandvehiculePackage.createPackageContents();
		theCraftPackage.createPackageContents();

		// Initialize created meta-data
		theVehiculeEMFPackage.initializePackageContents();
		theLandvehiculePackage.initializePackageContents();
		theCraftPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theVehiculeEMFPackage.freeze();

  
		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(VehiculeEMFPackage.eNS_URI, theVehiculeEMFPackage);
		return theVehiculeEMFPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getVehicule() {
		return vehiculeEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVehicule_PowerSource() {
		return (EAttribute)vehiculeEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVehicule_Mvt() {
		return (EAttribute)vehiculeEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVehicule_Name() {
		return (EAttribute)vehiculeEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getVehicule_Max_speed() {
		return (EAttribute)vehiculeEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getLandVehicule() {
		return landVehiculeEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getCraft() {
		return craftEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getPOWER_SOURCE() {
		return poweR_SOURCEEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getMOVEMENT_TYPE() {
		return movemenT_TYPEEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public VehiculeEMFFactory getVehiculeEMFFactory() {
		return (VehiculeEMFFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		vehiculeEClass = createEClass(VEHICULE);
		createEAttribute(vehiculeEClass, VEHICULE__POWER_SOURCE);
		createEAttribute(vehiculeEClass, VEHICULE__MVT);
		createEAttribute(vehiculeEClass, VEHICULE__NAME);
		createEAttribute(vehiculeEClass, VEHICULE__MAX_SPEED);

		landVehiculeEClass = createEClass(LAND_VEHICULE);

		craftEClass = createEClass(CRAFT);

		// Create enums
		poweR_SOURCEEEnum = createEEnum(POWER_SOURCE);
		movemenT_TYPEEEnum = createEEnum(MOVEMENT_TYPE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		LandvehiculePackage theLandvehiculePackage = (LandvehiculePackage)EPackage.Registry.INSTANCE.getEPackage(LandvehiculePackage.eNS_URI);
		CraftPackage theCraftPackage = (CraftPackage)EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI);

		// Add subpackages
		getESubpackages().add(theLandvehiculePackage);
		getESubpackages().add(theCraftPackage);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		landVehiculeEClass.getESuperTypes().add(this.getVehicule());
		craftEClass.getESuperTypes().add(this.getVehicule());

		// Initialize classes and features; add operations and parameters
		initEClass(vehiculeEClass, Vehicule.class, "Vehicule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getVehicule_PowerSource(), this.getPOWER_SOURCE(), "powerSource", null, 0, 1, Vehicule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getVehicule_Mvt(), this.getMOVEMENT_TYPE(), "mvt", null, 0, 1, Vehicule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getVehicule_Name(), ecorePackage.getEString(), "name", null, 0, 1, Vehicule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getVehicule_Max_speed(), ecorePackage.getEFloat(), "max_speed", null, 0, 1, Vehicule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);

		initEClass(landVehiculeEClass, LandVehicule.class, "LandVehicule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(craftEClass, Craft.class, "Craft", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		// Initialize enums and add enum literals
		initEEnum(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.class, "POWER_SOURCE");
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.PETROLEUM);
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.DIESEL);
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.STEAM);
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.GAS);
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.HUMAN);
		addEEnumLiteral(poweR_SOURCEEEnum, vehiculeEMF.POWER_SOURCE.ELECTRICITY);

		initEEnum(movemenT_TYPEEEnum, vehiculeEMF.MOVEMENT_TYPE.class, "MOVEMENT_TYPE");
		addEEnumLiteral(movemenT_TYPEEEnum, vehiculeEMF.MOVEMENT_TYPE.WHEELS);
		addEEnumLiteral(movemenT_TYPEEEnum, vehiculeEMF.MOVEMENT_TYPE.ROTOR);
		addEEnumLiteral(movemenT_TYPEEEnum, vehiculeEMF.MOVEMENT_TYPE.WINGS);

		// Create resource
		createResource(eNS_URI);
	}

} //VehiculeEMFPackageImpl
